package com.qf.util;

import com.qf.bean.Task;
import com.qf.dao.TaskDao;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.Date;

/**
 * 2019/11/30
 * Administrator
 * springQuartz1130
 * 面向对象面向君  不负代码不负卿
 */
public class MyTaskUtil {

    private TaskDao taskDao;
    private String username;

    public void setUsername(String username) {
        this.username = username;
    }

    public void setTaskDao(TaskDao taskDao) {
        System.out.println("setTaskDao");
        this.taskDao = taskDao;
    }

    //任务执行的方法
    public void test1() {
        System.out.println("taskdao"+taskDao);
        Task task = taskDao.findTaskByName(username);
        System.out.println(task);
    }
}
